from flask_migrate import MigrateCommand
from flask_script import Manager
from info import creat_app


#创建web应用
app = creat_app("dev")

"""脚本启动"""
# 创建管理器
mgr = Manager(app)

# 使用迁移器生成迁移命令
mgr.add_command("mc", MigrateCommand)


# class User(db.Model):
#     __tablename__ = "user_table"
#     id = db.Column(db.Integer, primary_key=True)
#     name = db.Column(db.String(32), unique=True, nullable=False)
#     pwd = db.Column(db.String(40))


if __name__ == '__main__':
    mgr.run()
